<?php
/*------------------------------------------
 	Theme Name: UCtheme
 	Theme URI:  http://www.uctheme.com
 	Description: 本模板是优畅主题工作室制作，精仿什么值得买网站wordpress主题，为淘宝客网站者提供一款功能齐全，实用的主题。本主题为商业主题，禁止未得到授权转让。本主题带强大的会员系统，收藏系统，投票系统，短链接等淘宝客实用功能。欢迎访问优畅主题工作室：http://www.uctheme.com
 	Version: 1.7
 	Author: 优畅主题
 	Author URI: http://www.uctheme.com
	QQ:1583310276 
-------------------------------------------*/
?>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<?php global $axglo_option; ?>
<meta name="author" content="优畅主题" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title>
<?php
	global $page, $paged;
	wp_title( '|', true, 'right' );
	bloginfo( 'name' );
	$site_description = get_bloginfo( 'description', 'display' );
	if ( $site_description && ( is_home() || is_front_page() ) )
		echo " | $site_description";
	if ( $paged >= 2 || $page >= 2 )
		echo ' | ' . sprintf( '页面 %s', max( $paged, $page ) );
	?>
</title>
<?php include("seo.php");?>
<html xmlns:wb="http://open.weibo.com/wb">
<script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri();?>/js/jquery-1.7.1.js"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri();?>/js/sitea.js"></script>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<meta name="description" content="<?php echo $description; ?>" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>"/>
<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/images/favicon.ico" />
<link rel="icon" href="
<?php 
global $uctheme_option;
$favico = $uctheme_option['general']['home_icon'];
if($favico){
echo $favico;
}
else{
$favico=bloginfo('template_directory').'/images/favicon.ico';
echo $favico;
}
?>" type="image/x-icon" />
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.js"></script>
<?php wp_head();?>
</head>
<body >
<!--s header-->
<header>
  <div class="header_top_parent">
    <div class="header_top" id="header_top">
      <div class="wrap">
        <div class="topLogo lfloat">
          <?php 
            global $uctheme_option;
            $menu_logo = $uctheme_option['general']['menu_logo'];             
            ?>
          <div style="float:left"> <a href="<?php bloginfo('home');?>"><img src="<?php if ($menu_logo){echo $menu_logo;	 }else {$menu_logo = get_template_directory_uri().'/images/menu_logo.png'; echo $menu_logo; }?>" alt="<?php bloginfo('name');?>" width="130" height="38"/></a> </div>
          <div style="float:right;color:#C9C9C9;display:block;font-size:16px;width:95px;height:38px;line-height:38px; font-family:Microsoft YaHei, SimSun, sans-serif">
            <?php bloginfo('name');?>
          </div>
        </div>
        <div  style="float:left;  padding-top:7px"  >
          <?php
                if(!is_user_logged_in()) {
                ?>
          <a class="regBtn" href="<?php bloginfo('url'); ?>/register"></a>
          <div class="loginBtn"> <a href="<?php bloginfo('url'); ?>/wp-login " class="loginButton">登录</a></div>
          <?php } ?>
        </div>
        <div class="menu_top" style="float:left">
          <?php if(is_user_logged_in()) { ?>
          <ul class="header_nav1_class" id="header_nav1">
            <?php get_currentuserinfo();
                global $current_user,$userdata;
                get_currentuserinfo();
                ?>
            <li> <?php echo esc_attr( $userdata->user_login ); ?> &nbsp; &nbsp;您的积分为：<strong>
              <?php   cp_displayPoints($result->ID);  ?>
              </strong> </li>
            <li><a href="<?php echo wp_logout_url( home_url() ); ?>">注销登录</a></li>
            <?php if(current_user_can('level_10') ) {?>
            <li><a href="<?php bloginfo('url'); ?>/wp-admin">管理中心</a></li>
            <li><a href="<?php echo smzdm_my_account_link(); ?>">会员中心</a></li>
            <?php } else {?>
            <li><a href="<?php echo smzdm_my_account_link(); ?>">会员中心</a></li>
            <?php } ?>
          </ul>
          <?php } ?>
        </div>
        <div class="topRightShare"> <a  class='toprss' href="http://feed.smzdm.com"  title="订阅" target="_blank"><img src="http://www.smzdm.com/wp-content/themes/smzdm_two_year/images/default/rss.jpg"></a>
          <!-- Baidu Button BEGIN -->
          <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare"> <span class="bds_more" ></span> </div>
          <!-- Baidu Button END -->
        </div>
        <div class="menu_top" style="width:250px; ">
          <ul id="header_nav2"  >
            <li><a href="<?php bloginfo('url'); ?>/default">晒物广场</a></li>
            <li><a href="<?php bloginfo('url'); ?>/default">优惠券</a></li>
            <li><a href="<?php bloginfo('url'); ?>/mall">海淘导航</a></li>
            <li><a href="<?php echo esc_url( home_url( '/' ) ); ?>tougao"  >我要投稿</a></li>
          </ul>
        </div>
        <div class="clear"></div>
      </div>
    </div>
  </div>
  <div class="wrap">
    <div class="logo">
      <div style="float:left;"><a href="<?php echo home_url('/');?>">
        <?php bloginfo('description'); ?>
        </a></div>
    </div>
    <div class="topAd">
      <div class="not_left_ce"> <span class="not_a1" onMouseOut="gstart()" onMouseOver="gstop()" style="cursor:pointer;" onClick="goup()"><img src="<?php echo get_template_directory_uri();?>/images/notice_left.png"></span> <span class="not_a2" onMouseOut="gstart()" onMouseOver="gstop()" style="cursor:pointer;" onClick="godown()"><img src="<?php echo get_template_directory_uri();?>/images/notice_right.png"></span> </div>
      <div id="news">
        <?php
			$args = array(
				'post_type'=>'notice',
				'showposts'=>5
			);
			query_posts( $args );
			if( have_posts() ) : ?>
        <ul id='topAd' onMouseOut="gstart()" onMouseOver="gstop()">
          <?php while( have_posts() ) : the_post(); ?>
          <li><a href="<?php the_permalink(); ?>">
            <?php the_title();?>
            </a></li>
          <?php endwhile;?>
        </ul>
        <?php endif; wp_reset_query(); ?>
      </div>
    </div>
    <div class="clear"></div>
    <nav>
      <div class="navBox" id="navbar">
        <div class="nav">
          <?php
					 $args = array(
						'echo' => true,
						'container' => false,
						'sort_column' => 'menu_order',
						'menu_id'=>'nav_id',
						'depth'=>2,
						'menu_class'=>'nav_class',
						'walker' => new SH_Last_Walker(),
						'theme_location' => 'uctheme-menu',
						'fallback_cb'=> '',
					);
					wp_nav_menu($args); 
           ?>
          <?php get_search_form();?>
        </div>
        <div class="clear"></div>
      </div>
    </nav>
  </div>
</header>
